package com.kb.design.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kb.design.annotation.FieldMeta;
import com.kb.design.common.Page;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 订单表(DesignOrder)实体类
 *
 * @author makejava
 * @since 2023-11-24 10:56:50
 */
@Data
@TableName("design_order")
@Accessors(chain = true)
public class DesignOrder {


    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 订单号
     */
//    @TableField("order_no")
    private String orderNo;
    /**
     * 订单类型

     */
    private String orderType;
    /**
     * 客户代码

     */
    private String customerCode;
    /**
     * 客户行业
     */
    private String customerProfession;
    /**
     * 客户名称
     */
    private String customerName;
    /**
     * 档案号

     */
    private String fileNumber;
    /**
     * 业务员代码

     */
    private String salesCode;
    /**
     * 业务员
     */
    private String salesName;
    /**
     * 合同号
     */
    private String contractNo;
    /**
     * 总金额
     */
    private BigDecimal totalAmount;
    /**
     * 订单管理员
     */
    private String orderManager;

    /**
     * 币种
     */
    private String currencyCode;

    /**
     * 订单日期
     */
    private LocalDate orderDate;
    /**
     * 订单交期
     */
    private LocalDate deliveryDate;
    /**
     * 贸易路径
     */
    private String tradeDesc;
    /**
     * 销售组织
     */
    private String salesOrg;
    /**
     * 生产组织
     */
    private String prodOrg;
    /**
     * 文件名
     */
    private String fileName;
    private String remark;

    private String createBy;
    private BigDecimal pinAmount;
    private String unitPrice;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @FieldMeta(name = "创建时间")
    private LocalDateTime createTime;
    
    private String updateBy;
    private Integer layers;
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    private Long version;

    private String dept1;
    private String dept2;
    private String dept3;
    /**
     * 税率
     */
    private Integer invType;

    @TableField(exist = false)
    private Integer  pageNo = 1;
    @TableField(exist = false)
    private Integer pageSize = 10;
}

